#ifndef _CTRL_RADAR_CHART_H_
#define _CTRL_RADAR_CHART_H_

#include <QChart>
#include <QChartView>
#include <QVector>
#include <stdint.h>
#include <qscatterseries.h>
class CtrlRadarChart : public QChartView {
  Q_OBJECT

public:
  CtrlRadarChart(QWidget *parent = nullptr);

protected:
  void mousePressEvent(QMouseEvent *event) override;
  void mouseMoveEvent(QMouseEvent *event) override;
  void mouseReleaseEvent(QMouseEvent *event) override;
  void mouseDoubleClickEvent(QMouseEvent *event) override;
  void wheelEvent(QWheelEvent *event) override;

Q_SIGNALS:
  void SPointClicked(const QPointF &point);

private:
  QPoint lastPos;
  bool isDragging;

public:
  void UpdateRadarData(QVector<uint32_t> data);
  void MarkPoint(QString name, QVector<QPoint> &mark_point,
                 Qt::GlobalColor color, int size = 10,
                 int shape = QScatterSeries::MarkerShapeCircle);
};
#endif //_CTRL_RADAR_CHART_H_